home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3878 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: GIMLI.genias.de!usenet
  2. From: Andreas Haas <andreas>
  3. Newsgroups: comp.lang.c++,comp.unix.programmer
  4. Subject: Re: c++ static objects and fork
  5. Date: 26 Jan 1996 15:08:04 GMT
  6. Organization: GENIAS Software GmbH
  7. Message-ID: <4eaqok$7pr@GIMLI.genias.de>
  8. References: <4e8qu5$cmb@news02.comp.pge.com>
  9. NNTP-Posting-Host: balin.genias.de
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.2 sun4c)
  14. X-URL: news:4e8qu5$cmb@news02.comp.pge.com
  15.  
  16. Hi Phil,
  17.  
  18. I didn't test your question with an example. But I would 
  19. say that nothing happens to these static objects. 
  20. What should happen? 
  21.  
  22. fork() makes a copy of the whole writable memory of the 
  23. forked process (some special operations are done with 
  24. open file descriptors) and starts a new process (one 
  25. could say fork() is a kind of copy constructor for 
  26. processes). 
  27.  
  28. Did you expect that fork() would call a copy 
  29. constructor for static objects?
  30.  
  31. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  32.                         Andreas Haas
  33. GENIAS Software GmbH             | Email:  andreas@genias.de
  34. Erzgebirgstr. 2 B                | Tel.:   ++49 +9401 9200-0/41
  35. D-93073 Neutraubling/Germany     | FAX:    ++49 +9401 9200-92
  36. http://www.genias.de             |
  37. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  38.  
  39.